<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>收藏清单</title>
</head>
<body>
  <script>
    function fn(nums) {
      const f = (a1, a2) => (a1.length !== a2.length) && a1.every(item => a2.includes(item))
      let tmp = []
      for (let i = 0; i < nums.length; i++) {
        tmp.push(i)
        for (let j = 0; j < nums.length; j++) {
          if (f(nums[i], nums[j])) {
            tmp = tmp.filter(item => item !== i)
          }
        }
      }
      return tmp
    }
    console.log(fn([['leetcode'], ['google'], ['facebook'], ['amazon']]))
  </script>
</body>
</html>